/*
 * Powered By [Frank-Liz-Lee]
 * Copyright(C) 2012-2016 Liz Company
 * All rights reserved.
 */
package com.linln.modules.system.domain;

import java.io.Serializable;
import java.util.*;

/**
 *
 */
public class Menu implements Serializable {

    private static final long serialVersionUID = 1L;

    /* 主键ID */
    private Long id;

    /* 菜单名称 */
    private String title;

    /* 父级编号 */
    private Long pid;

    /* 所有父级编号 */
    private String pids;

    /* URL地址 */
    private String url;

    /* 权限标识 */
    private String perms;

    /* 图标 */
    private String icon;

    /* 类型（1:一级菜单,2:子级菜单,3:不是菜单） */
    private Byte type;

    /* 排序 */
    private Integer sort;

    /* 备注 */
    private String remark;

    /* 创建时间 */
    private java.sql.Timestamp createDate;

    /* 更新时间 */
    private java.sql.Timestamp updateDate;

    /* 创建用户 */
    private Long createBy;

    /* 更新用户 */
    private Long updateBy;

    /* 状态（1:正常,2:冻结,3:删除） */
    private Byte status;

    private Set<Role> roles ;

    private Map<Long, Menu> children = new HashMap<>();

    /* get 主键ID */
    public Long getId() {
        return id;
    }

    /* set 主键ID */
    public void setId(Long id) {
        this.id = id;
    }
    /* get 菜单名称 */
    public String getTitle() {
        return title;
    }

    /* set 菜单名称 */
    public void setTitle(String title) {
        this.title = title;
    }
    /* get 父级编号 */
    public Long getPid() {
        return pid;
    }

    /* set 父级编号 */
    public void setPid(Long pid) {
        this.pid = pid;
    }
    /* get 所有父级编号 */
    public String getPids() {
        return pids;
    }

    /* set 所有父级编号 */
    public void setPids(String pids) {
        this.pids = pids;
    }
    /* get URL地址 */
    public String getUrl() {
        return url;
    }

    /* set URL地址 */
    public void setUrl(String url) {
        this.url = url;
    }
    /* get 权限标识 */
    public String getPerms() {
        return perms;
    }

    /* set 权限标识 */
    public void setPerms(String perms) {
        this.perms = perms;
    }
    /* get 图标 */
    public String getIcon() {
        return icon;
    }

    /* set 图标 */
    public void setIcon(String icon) {
        this.icon = icon;
    }
    /* get 类型（1:一级菜单,2:子级菜单,3:不是菜单） */
    public Byte getType() {
        return type;
    }

    /* set 类型（1:一级菜单,2:子级菜单,3:不是菜单） */
    public void setType(Byte type) {
        this.type = type;
    }
    /* get 排序 */
    public Integer getSort() {
        return sort;
    }

    /* set 排序 */
    public void setSort(Integer sort) {
        this.sort = sort;
    }
    /* get 备注 */
    public String getRemark() {
        return remark;
    }

    /* set 备注 */
    public void setRemark(String remark) {
        this.remark = remark;
    }
    /* get 创建时间 */
    public java.sql.Timestamp getCreateDate() {
        return createDate;
    }

    /* set 创建时间 */
    public void setCreateDate(java.sql.Timestamp createDate) {
        this.createDate = createDate;
    }
    /* get 更新时间 */
    public java.sql.Timestamp getUpdateDate() {
        return updateDate;
    }

    /* set 更新时间 */
    public void setUpdateDate(java.sql.Timestamp updateDate) {
        this.updateDate = updateDate;
    }
    /* get 创建用户 */
    public Long getCreateBy() {
        return createBy;
    }

    /* set 创建用户 */
    public void setCreateBy(Long createBy) {
        this.createBy = createBy;
    }
    /* get 更新用户 */
    public Long getUpdateBy() {
        return updateBy;
    }

    /* set 更新用户 */
    public void setUpdateBy(Long updateBy) {
        this.updateBy = updateBy;
    }
    /* get 状态（1:正常,2:冻结,3:删除） */
    public Byte getStatus() {
        return status;
    }

    /* set 状态（1:正常,2:冻结,3:删除） */
    public void setStatus(Byte status) {
        this.status = status;
    }

    public Set<Role> getRoles() {
        return roles;
    }

    public void setRoles(Set<Role> roles) {
        this.roles = roles;
    }

    public Map<Long, Menu> getChildren() {
        return children;
    }

    public void setChildren(Map<Long, Menu> children) {
        this.children = children;
    }

    public String toString() {
        return "Menu {" +
                " , id = " + id +
                " , title = " + title +
                " , pid = " + pid +
                " , pids = " + pids +
                " , url = " + url +
                " , perms = " + perms +
                " , icon = " + icon +
                " , type = " + type +
                " , sort = " + sort +
                " , remark = " + remark +
                " , createDate = " + createDate +
                " , updateDate = " + updateDate +
                " , createBy = " + createBy +
                " , updateBy = " + updateBy +
                " , status = " + status +
            "}";
        }
}